#ifndef LED_H
#define LED_H

#include <stdint.h>
#include <stdbool.h>
#include "board.h"

typedef void (*pLedHandler)(void);

typedef struct
{
    uint32_t onTime;
    uint32_t offTime;
    uint32_t controlLimit;
    bool noLimit;
    pLedHandler pLedFunc;
} LED_STRUCT;

// 函数声明
void led_gpio_init(void);

void BOARD_RedLedOff(void);
void BOARD_GreenLedOff(void);
void BOARD_BlueLedOff(void);
void BOARD_RedLedOn(void);
void BOARD_GreenLedOn(void);
void BOARD_BlueLedOn(void);
void RedLedToggle();
void GreenLedToggle();
void BlueLedToggle();

void LedHandleRegister(LED_ID id);
void LedHandleProcess();
void LedTimeInit(SYSTEM_LED_TYPE type, LED_ID led_id);
bool LedSingleControl(uint16_t millisec, bool bcloseall);
void LEDonoff(uint8_t led_type, bool onoff);
void BOARD_LEDtest();
uint8_t LedGetSystemStat();


#endif // LED_H
